﻿<!DOCTYPE html>
<html lang="zh">

<head resource>
    <meta charset="utf-8">
    <include file="../inc/meta.inc" />
    <title></title>
</head>

<body>
    <div id="vapp" v-cloak>
        <loading v-if="loading_init" class="loading_init">正在初始化...</loading>
        <template v-else>
            <div v-if="!islogin" class="nologin">
                <icon>&#xe7ad</icon>未登录
            </div>
            <template v-else>
                <div class="header">
                    <div>
                        <el-form ref="form" :inline="true" :model="form" :rules="rules" v-on:submit.native.prevent>
                            <el-form-item label="" prop="money">
                                <el-input placeholder="请输入金额" style="width: 500px;" v-model="form.money" type="number"
                                    min="0">
                                    <template slot="prepend">
                                        <icon>&#xe624</icon>
                                    </template>
                                    <el-button slot="append" type="primary" plain @click="payEntry('form')"
                                        :disabled="paypis.length==0">
                                        <icon style="font-size: 15px;">&#xe62d</icon>在线充值
                                    </el-button>
                                </el-input>
                            </el-form-item>
                        </el-form>
                    </div>
                    <div class="total">
                        余额：<span v-html="account.Ac_Money"></span>元
                    </div>
                </div>
                <!-- 在线支付接口列表 -->
                <div class="paypis" v-if="paypis.length>0">
                    <div class="title">选择支付方式</div>
                    <div class="list">
                        <div v-for="(item,index) in paypis" class="payitem" :current="item.Pai_ID==form.payid"
                            @click="setCurrentpay(item.Pai_ID)">
                            <icon>&#xa02d</icon>
                            <img :src="'/Utilities/Images/Pay/'+item.Pai_Pattern+'.png'" />
                            <span>{{item.Pai_Name}}</span>
                        </div>
                    </div>
                </div>
                <div v-else class="nopaypis">
                    <el-tag type="warning">
                        <icon>&#xe7ad</icon>未设置支付接口
                    </el-tag>

                </div>
                <el-dialog title="提示" :visible.sync="paypanel" width="40%" :close-on-click-modal="false">
                    <div slot="title">
                        <icon style="font-size: 15px;">&#xe62d</icon>充值
                        ({{payif!=null ? payif.Pai_Name : ''}})
                    </div>
                    <div class="recharge_val"><span v-html="form.money"></span>
                        元</div>
                    <div slot="footer">
                        <el-button type="primary" define="enter" @click="open_paywindow()" v-if="!isopenpay">确认支付
                        </el-button>
                        <el-button type="success" @click="fresh_window()" v-else>确认支付成功,刷新页面</el-button>
                        <el-button type="info" plain @click=" ()=>{isopenpay=false;paypanel=false;}">取消</el-button>
                    </div>
                </el-dialog>
            </template>
        </template>
    </div>
</body>

</html>